const session = require('koa-session-minimal');
const MongoStore = require('koa-generic-session-mongo');
const config = require('../config');

let cookie = {
    maxAge: 1000 * 60 * 60,
    httpOnly: true
};

module.exports = session({
    key: 'news_monitor',
    store: new MongoStore({
        url: config.mongodb
    }),
    cookie: cookie
});